<?php
/*
 *	DreamArticle Version3.0
 *	Copyright 2007-2008, iDreamSoft
 *	http://www.idreamsoft.cn
 *	By:coolmoo<idreamsoft@qq.com>
*/
define('DC_PLUGINS_PATH',DCPATH."plugins");
function DreamCMS_plugins($arguments,&$DreamCMS){
	add_magic_quotes($arguments);
	strpos($arguments['name'],'..')!==false && exit('Forbidden');
	$fn='DreamCMS_plugins_'.$arguments['name'];
	if (!function_exists($fn)){
		$funpath=DC_PLUGINS_PATH."/{$arguments['name']}.php";
		if(file_exists($funpath)){
			require_once($funpath);
		}
	}
	return call_user_func_array($fn,array($arguments,$DreamCMS));
}
?>